Skip to content

chore: upgrade yarn to v4 (berry) and add node 22 ci tests#11

Merged
frostevent merged 2 commits into
mainfrom
kev/dependencies
Jul 1, 2026
Merged

chore: upgrade yarn to v4 (berry) and add node 22 ci tests#11
frostevent merged 2 commits into
mainfrom
kev/dependencies

Conversation

@weedgrease

Copy link
Copy Markdown
Collaborator

Summary

Upgrades tooling to Yarn 4 (Berry) and adds a Node 22 + 24 CI test matrix, bringing
x401-node in line with proof-vc-common. Also refreshes Dependabot config and the
Node-version docs.

Changes

Yarn 1 → 4.17.0 (Berry)

  • Pin Yarn via packageManager: [email protected] + .yarn/releases/yarn-4.17.0.cjs; run
    through Corepack.
  • Add .yarnrc.yml: nodeLinker: node-modules, enableImmutableInstalls,
    enableScripts: false (no postinstall scripts), npmMinimalAgeGate: 1w,
    enableGlobalCache.
  • Regenerate yarn.lock in the Berry format.
  • publish.yml: add corepack enable, drop --frozen-lockfile (immutable installs
    are the default now).
  • .gitignore / .prettierignore updated for the Berry layout (keep
    .yarn/releases etc., ignore .yarn/* and spec/).
  • Rename eslint.config.jseslint.config.mjs.
  • Bump devDeps: @types/node ^25.9.1 → ^24.13.2, eslint ^10.4.0 → ^10.5.0,
    typescript-eslint ^8.61.0 → ^8.62.0.

CI: Node 22 + 24 test matrix

  • Split the test job into test-matrix (runs yarn test on Node 22 and 24) and an
    aggregate test gate (needs: test-matrix, if: always()).
  • The gate keeps a single stable required check named test for the branch ruleset,
    so the matrix legs (test (22) / test (24)) don't need to be enumerated in branch
    protection. always() makes a cancelled leg fail the gate rather than pass silently.
  • Other jobs (format, lint, typecheck, build, publint) continue on Node 24 from
    .node-version.

Dependabot

  • Add a 7-day cooldown (matches npmMinimalAgeGate).
  • Ignore @types/node major bumps so it tracks the active LTS (24), not latest.

Docs

  • CLAUDE.md Rule 7: engines.node >=22 is the consumer floor (dist uses only
    long-stable globals); dev/CI run on Node 24; the CI matrix now verifies the floor at
    runtime. Note that the Node 22 leg resolves to the latest 22.x because the native
    .ts test runner needs default type stripping (Node >=22.18) — don't pin the low leg
    below that.
  • CONTRIBUTING.md: fix the requirement (was >=24, now >=22 published floor with
    dev on 24) and document the CI matrix.

Rationale

engines.node stays at >=22.0.0 — the consumer floor, since the shipped dist only
uses long-stable globals and runs on any maintained LTS. @types/node tracks the dev /
active-LTS line (24); the runtime floor is now guarded by the CI matrix rather than the
type version.

Test plan

  • CI: format / lint / typecheck / build / publint on Node 24; test on Node 22 and 24.
  • Local: yarn test → 32 pass; yarn build && yarn publint → clean.

@frostevent frostevent enabled auto-merge (squash) July 1, 2026 09:40
@frostevent frostevent merged commit 56bad4e into main Jul 1, 2026
8 checks passed
@frostevent frostevent deleted the kev/dependencies branch July 1, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants